<?php
	/**
	 * 获取元宝兑换乐豆列表
	 */
    class GetChangeCoinList extends APIBase {
		
		public $tag = "GetChangeCoinList";
		public $isLogin = false;
		
		public function before() {
			$this->initCacheRedis();
			return true;
		}

		public function logic() {
			$keys = $this->cache_redis->lRange("cm:ids", 0, -1);
			$changelist = array();
			foreach ($keys as $key) {
				$changecons = $this->cache_redis->hMGet("cm:{$key}", array("id", "coin","money", "desc", "createtime"));
				$changelist[] = $changecons;
			}
			
			$this->returnData($changelist);
		}
		
    	public function after() {
			$this->deinitCacheRedis();
		}
    }
?>
